﻿using ProjectDanmaku.Broadcast;
using ProjectDanmaku.Effect;
using UnityEditor;
using UnityEngine;

namespace Editor.ProjectDanmaku.Inspector
{
    [CustomEditor(typeof(CameraShakeEffect))]
    public class CameraShakeEffectInspector : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            
            var effect = (CameraShakeEffect)target;

            if (GUILayout.Button("Do Effect"))
            {
                effect.BeginShake(new BroadcastReceiverInfo());
            }
        }
    }
}